package com.huawei.iocc.goods.service.impl;

import com.huawei.iocc.goods.dao.GoodsDao;
import com.huawei.iocc.goods.entity.GoodsEntity;
import com.huawei.iocc.goods.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 黄后林
 * @date 2022-11-03 15:04:14
 * @note 程序员是用代码喂出来的
 */
@Service
public class GoodsServiceImpl implements GoodsService {

    @Autowired
    private GoodsDao dao;

    @Override
    public List<GoodsEntity> getAll() throws RuntimeException {

         List<GoodsEntity> list = dao.findAllGoods();
//        List<GoodsEntity> list = dao.selectAll();

//        for (GoodsEntity entity : list) {
//
//            if(entity.getBillStatus()==0){
//                entity.setBillStatusName("待处理");
//            }else if(entity.getBillStatus()==1){
//                entity.setBillStatusName("处理中");
//            }else{
//                entity.setBillStatusName("已处理");
//            }
//
//        }

        return list;
    }
}
